﻿module Supernova {

    export class ShipPreset {

        public name: string = 'Unnamed Class';
        public population: number = 0;
        public terraform: number = 0;
        public scanning: number = 0;
        public speed: number = 0;
        public armor: number = 0;
        public shields: number = 0;
        public attack: number = 0;
        public bombard: number = 0;
        public mining: number = 0;

        public clone(): ShipPreset {
            var preset = new ShipPreset();
            preset.name = this.name;
            preset.population = this.population;
            preset.terraform = this.terraform;
            preset.scanning = this.scanning;
            preset.speed = this.speed;
            preset.armor = this.armor;
            preset.shields = this.shields;
            preset.attack = this.attack;
            preset.bombard = this.bombard;
            preset.mining = this.mining;
            return preset;
        }

        public equals(other: ShipPreset): boolean {
            return this.population == other.population &&
                   this.terraform == other.terraform &&
                   this.scanning == other.scanning &&
                   this.speed == other.speed &&
                   this.armor == other.armor &&
                   this.shields == other.shields &&
                   this.attack == other.attack &&
                   this.bombard == other.bombard &&
                   this.mining == other.mining;
        }

    }

}